package training.oop.inheritance;


/**
 * You can never be able to extend a class which is declared as final.
 * That means no other class can extend this class.
 * @author harinath
 *
 */
public final class FinalClassWithoutChildren {
	
	private final String name;
	
	FinalClassWithoutChildren(){
		super();
		name = "Hari";
	}
	public void sayHelloFromFinalClass(final String name){
	
		System.out.println("Hello from FinalClass : " +name);
		//name = "Ambika";  // you can not assign value for final parameter
		Parent p = new Parent();
		System.out.println("Id with default access specifier in Parent is avaialble for me :" + p.id);
		System.out.println("This is because I am also in the same package as Parent");
	}

}
